Photo signal processing apparatus

ABSTRACT

A photo signal processing apparatus which comprises a light receiving unit of charge accumulation type for outputting a data corresponding to a condition of light received thereby, a data processor for applying a predetermined processing to the data outputted from the light receiving unit, an accumulation initiating device for causing the light receiving unit to initiate a charge accumulating operation, an accumulation interrupting device for interrupting the charge accumulating operation of the light receiving unit, a counter for counting a time passed during a period subsequent to the start of the charge accumulating operation of the light receiving unit and until the termination of the charge accumulating operation of the light receiving unit, and a control unit for activating the accumulation initiating device at a timing required to interrupt the charge accumulating operation of the light receiving unit at the time of termination of the data processing performed by the data processor.

.Iadd.This is a continuation of application Ser. No. 07/871,721, filedon Apr. 20, 1992, for a PHOTOSIGNAL PROCESSING APPARATUS, now abandonedwhich is a reissue application of U.S. Pat. No. 4,920,370..Iaddend.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention generally relates to a photo signal processingapparatus and, more particularly, to a photo signal processing apparatusutilizing a charge accumulation type light receiving unit such as, forexample, a charge coupled device (CCD), including a plurality ofphotosensor elements for receiving light, which is operable to performdata processing based on data fed from the light receiving unit.

2. Description of the Prior Art

This type of photo signal processing apparatus is disclosed, forexample, in the Japanese Laid-open Patent Publication No. 60-125817.According to this publication, when accumulation completes in the lightreceiving unit of charge accumulation type, the next succeedingaccumulating operation is performed. However, a data processing meansfor carrying out data processing in response to data from the lightreceiving unit does not accept any data from the light receiving unitduring the data processing.

In such case, even if the accumulation of the light receiving unitcompletes during the data processing of a previous accumulation becausea target object is of high brightness, the data resulting from thecompletion of the accumulation will not be inputted in overlappingrelationship with the data processing of the previous accumulation dataoccurring parallel to this accumulation. It is only where theaccumulation of the light receiving unit requires a relatively long timebecause of the low brightness of the target object, that the chargeaccumulation for the next data processing can be carried out during thedata processing of the previous accumulation so that the time requiredto complete a single focus detecting operation can be rendered to besmaller than the sum of the charge accumulating time of the lightreceiving unit and the data processing time.

However, according to the prior art data processing apparatus of thetype described hereinabove, as shown in FIG. 14 of the accompanyingdrawings, in the event that the charge accumulation 3 and 6 of the lightreceiving unit takes place parallel to a final stage of the dataprocessing 1 and 2, but occurs shortly before the termination of thedata processing 1 and 2, a signal associated with the chargeaccumulation 3 and 6 cannot be utilized because the data processing 1and 2 has not yet been terminated. Therefore the next succeeding dataprocessing 2 and 3 can only be initiated in response to a signalassociated with the subsequent charge accumulation 4 and 7.

Because of the above, it often happens that the signal data processingcycle tdc is equal to or substantially equal to the sum of the time tirequired for the charge accumulation of the light receiving unit and thetime Td required for the data processing, and, therefore, the dataprocessing speed at the time the data processing is repeatedly carriedout tends to be lower than possible.

SUMMARY OF THE INVENTION

Accordingly, the present invention has been devised to substantiallyeliminate the above described problems inherent in the prior art and hasfor its one object to provide an improved photo signal processingapparatus reliable in operation.

According to one preferred embodiment of the present invention, thephoto signal processing apparatus is featured in the provision of, alight receiving unit of charge accumulation type, a data processingmeans for performing a data processing based on data from the lightreceiving unit, an accumulation initiating means for causing the lightreceiving unit to initiate an accumulation operation, an accumulationinterrupting means for causing the light receiving unit to interrupt theaccumulation operation, a count means for counting the time elapsedsubsequent to the start of the accumulating operation of the lightreceiving unit and until the completion of the accumulating operation,and an accumulation start control means for operating the accumulationinitiating means at a timing required to terminate the accumulatingoperation of the light receiving unit by causing the accumulationinterrupting means at the time of completion of the data processing onthe basis of a data from the count means.

According to the foregoing arrangement, the light receiving unit startsthe first accumulation by the action of the accumulation initiatingmeans in response to a command from the accumulation start controlmeans, and interrupts the first accumulation by the action of theaccumulation interrupting means when a predetermined saturated conditionis reached. At this time, the data processing means receives a signalassociated with the first accumulation to perform a first dataprocessing. The accumulation time Til required for the light receivingunit to complete the first accumulation corresponds to brightnessconditions of the target object from which the light receiving unitreceives light and provides a reference time required for theaccumulation at the time of the subsequent light receipt. Thisaccumulation time Til is counted by the count means which receives fromthe accumulation initiating means and the accumulation interruptingmeans respective signals representative of the start and termination ofthe first accumulation of the light receiving unit, a count signalthereafter supplied to the accumulation start control means.

The accumulation start control means which has received the count signalmakes use of a required processing time Td predetermined by the dataprocessing means to determine a charge accumulation starting time Tsrequired to terminate the second accumulation taking place in parallelto the first data processing, preferably at a timing Te delayed a littlefrom the completion of the first data processing (an extra time takenfor safety purpose in order to accommodate normal change in brightnessof the target object to a higher value). In sum, the accumulation startcontrol causes the light receiving unit to start the accumulation forthe second data processing while causing the accumulation initiatingmeans to operate at the timing Ts during the first data processing Tshaving been calculated to the basis of that first charge accumulatingtime.

Thereafter, the accumulation start control means causes the subsequentthird, fourth, . . . charge accumulation for the succeeding third,fourth . . . data processing during the subsequent second, third . . .data processing at the timing Ts calculated on the basis of the chargeaccumulating time Ti2, Ti3, . . . for the second, third. . . .accumulation that has taken place during the previous first, second, . .. data processing.

In this way, in the light receiving unit, the accumulation for thesucceeding second, third, fourth, . . . data processing essentiallytakes place one time during the preceding first, second, third, . . .data processing and terminates at a predetermined timing Te after thetermination of the first, second, third, . . . parallel data processingso that the accumulation data can be utilized during the next succeedingsecond, third, fourth, . . . data processing.

Accordingly, while the cycle time T of the initial data processing isequal to the sum of the accumulating time Til and the data processingtime Td, the subsequent data processing time Tdc is equal to the lessersum of the data processing time Td and the time ΔT the lapse of timebetween the end of the data processing time Td and the termination ofthe subsequent accumulation delayed therefrom, T is relatively small ascompared to the data processing time Td. Accordingly, when the dataprocessing is repeatedly performed, the data processing speed is nearlyoptimal. Since the accumulation of the light receiving unit and the dataprocessing based thereon correspond to each other on a 1-to-1 basis, theproblems of the signal from the light receiving unit being repeatedlyused or no signal obtained are avoided.

Also, since the data processing for each time is carried out on thebasis of the updated charge accumulation time Til. . .n resulting fromthe charge accumulation performed by the light receiving unit during theprevious data processing, even when the brightness condition of thetarget object varies, so long as within a normal range, there is nopossibility that the accumulation start timing during which theaccumulation start control means performs a calculation for the nextsucceeding data processing would not match with an actual situation.Therefore, it is possible to substantially avoid any possible deviationin timing beyond a tolerance between the time of termination of thefirst, second, third, . . . data processing and the time of terminationof the second, third, fourth, . . . accumulation of the light receivingunit parallel thereto.

Another object of the present invention is to provide an automaticfocusing device for a camera having a light receiving unit of chargeaccumulation type, in which the automatic focusing operation can beperformed more precisely and more quickly in comparison with aconventional device, for example, as disclosed in Japanese Laid-OpenPatent Application No. 60-107011.

Another object of the present invention is to provide a sequence controldevice for a camera having a light receiving unit of charge accumulationtype, in which data processing for automatic focusing control and dataprocessing for automatic exposure control are sequentially controlled bya single microprocessor which also controls the charge accumulation ofthe light receiving unit.

A further object of the present invention is to provide a sequencecontrol device for a camera, in which data processing for automaticcontrol and data processing for automatic exposure control can bequickly and precisely performed by a single microprocessor in comparisonwith a conventional device, for example, as disclosed in JapaneseLaid-Open Patent Application No. 60-107011.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other objects and features of the present invention willbecome clear from the following description of the preferred embodimentsread with reference to the accompanying drawings, in which:

FIG. 1 is a system block diagram showing one embodiment of the presentinvention;

FIGS. 2 to 11 are flow charts showing the sequence of operation of theembodiment shown in FIG. 1, wherein FIG. 2 is a main routine;

FIG. 3 is a flow chart showing the flow from an interruption process toan AF data processing.

FIG. 4 is an AF routine;

FIG. 5 is a PF routine;

FIG. 6 is a low contrast routine;

FIG. 7 is an event counter interruption processing routine;

FIG. 8 is an accumulation subroutine;

FIG. 9 is a switch discriminating subroutine;

FIG. 10 is a motor stop subroutine and;

FIG. 11 is a termination discriminating subroutine;

FIG. 12 is a flow chart showing a modification made to the flow chartshown in FIG. 2;

FIG. 13 is a flow chart showing a modification made to the flow chartshown in FIG. 3;

FIG. 14 is a diagram used to explain the prior art apparatus.

DETAILED DESCRIPTION OF THE EMBODIMENTS

One embodiment wherein the present invention is applied to an auto-focuscamera of TTL (through-the-lens) light measuring system will bedescribed with reference to FIGS. 1 to 11.

The photographic camera in the illustrated embodiment, has, incombination with a function of automatic exposure (hereinafter referredto as "AE"), two capabilities of auto-focusing (hereinafter referred toas "AF") and power focusing (hereinafter referred to as "PF").

The system outline of such camera will first be described withparticular reference to FIG. 1.

The camera is equipped with a microcomputer MC to which an AE controlunit ECC for the AE, a light measuring circuit and analog-to-digital(A/D) converter LAD for the AE control, a film sensitivity output unitISD, a lens circuit LEC for supplying various data peculiar to aparticular lens to the microcomputer MC through a serial data bus SDB,and others are connected. Based on necessary input data from the lightmeasuring circuit and A/D converter LAD, the film sensitivity outputunit ISD, the lens circuit LEC and the others, the AE control unit ECCis controlled by the microcomputer MC to perform an AE operation. At thesame time, a liquid crystal display unit DSP connected with themicrocomputer MC displays exposure control data. The A/D conversion inthe light measuring circuit and A/D converter LAD is cyclically carriedout and is brought in position ready to receive data from themicrocomputer MC at any time subsequent to the completion of the firstA/D conversion.

A switch S1 connected with the microcomputer MC is closed upon the firststage of depression of a shutter release button to activate the lightmeasuring circuit and A/D converter LAD. A switch S2 is closed upon thesecond state of depression of the shutter release switch. A switch S4 isopened upon the completion of a shutter charging.

For the purpose of AF and PF, a motor drive circuit MD and a motor MOfor driving a focusing lens of a photographic lens is connected with themicrocomputer MC. The motor drive circuit MD is controlled by themicrocomputer MC on the basis of data fed from a one-dimensional linesensor LM, such as, for example, CCD (charge-coupled device), connectedwith the microcomputer MC, an encoder EC for monitoring the lens driveamount, the lens circuit LEC and others. The focusing under any one ofAF and PF modes is carried out in such a way as to shift the lens inbackward direction when in a front focus condition and to shift the lensin forward direction which in a rear focus condition. At the same time,a focusing display unit FDS connected with the microcomputer MC displaysa focusing condition.

Pulses from the encoder EC are inputted through a CKIN terminal of themicrocomputer MC to an internal event counter EVC (as will be describedlater) of the microcomputer MC, and in dependence on the number of thepulses the event counter EVC is counted down.

The focusing display unit FDS includes three display segments a, b, andc. Any one of them is turned on for displaying the focusing condition ofthe photographic lens under the PF mode. For example, either one of thedisplay segments a and b is turned on when the front-focus condition andrear-focus condition is detected under the PF mode, respectively. Thedisplay segment c is turned on when the in-focus condition is detected.On the other hand, even though the display segment c is turned on whenthe in-focus condition is detected under the AF mode, the other displaysegments a and b are not turned on even if the front-focus condition orthe rear-focus condition is detected. In the event that no focusdetection is possible in AF mode because of a low contrast of the targetobject, both of the display segments a and b, indicative of the frontand rear focus conditions, respectively, are energized to blink. Shouldthe lens be moved to an infinity position or to a closest availableposition either, the display segment a, conforming to the direction ofshifting the lens towards the infinity position, or the display segmentb, conforming to the direction of shifting the lens towards the closestavailable position, is energized to blink, respectively.

The one-dimensional line sensor LM is of a charge accumulation type andis operable to accumulate, in response to the receipt of light from atarget object, a charge necessary for the data processing uponcompletion of a charge accumulation, an interruption signal relative tothe control of the microcomputer MC is inputted from an interfacecircuit IF to an interruption terminal INT1 of the microcomputer MC.

The details of the one-dimensional line sensor LM and the interfacecircuit IF are disclosed in, for example, the Japanese Laid-open PatentPublication No. 60-101516.

A switch AFS connected with the microcomputer MC is a selector switchfor selecting either AF or PF mode. The AF and PF modes can be selectedwhen this switch AFS is closed and opened, respectively. Hence, unlessthe AF mode is chosen, the PF mode is always possible. In PF mode, onlyby depressing one the PF switches PFS1 and PFS2 determinative ofdifferent directions in which the lens is driven one at a time, can a PFoperation be caused to occur in one of the directions. The PF switchesshift the lens in a backward direction when the PF switch PFS1 is closedand shift the lens in a forward direction when the PF switch PFS2 isclosed.

While the PF switches PFS1 and PFS2, the shutter release switch S2 andthe switch S4 are all connected direct to the microcomputer MC, thelight measuring switch S1 is, together with respective shunt input linesfrom the PF switches PFS1 and PFS2, connected as a switching line SW tothe microcomputer MC through an AND gate AN, and a shunt line from theswitching line SW is connected to an interruption terminal INT0 of themicrocomputer MC.

It is to be noted that the microcomputer MC has a counter interruptingfunction for enabling a counter interruption when the count is zero as aresult of the count-down of the event counter EVC and also a timer-Iinterrupting function of enabling a timer interruption when the contentof a timer I (as will be described later) is counted down to zero from apreset value in response to internal clocks. A power source GV has anoutput line HV which feeds an electric power to both of theone-dimensional line sensor LM and the interface circuit IF, and anotheroutput line LV which feeds an electric power to the light measuringcircuit and A/D converter LAD. The power source GV starts its electricpower supplying operation when a power source control signal PWC fedfrom the microcomputer MC is rendered to be "Low". It is to be notedthat reference character EV represents an electric power supply line forsupplying an electric power to circuits other than the above describedcircuits.

The control operation performed by the microcomputer MC in the camerasystem outlined above is as shown in the flowcharts of FIGS. 2 to 11,reference to which will not be made.

Various controls performed by the microcomputer MC according to theseflowcharts will be explained. When one of the switches S1, PFS1 or PFS2shown in FIG. 1 is closed, the output of the AND gate AN is rendered tobe "Low" with the consequence that the terminal INT0 is applied with aninterruption signal and the microcomputer MC starts its operationexecuting a main routine shown in FIG. 2. As shown therein, andsubsequent to the interruption, the power source GV is activated at step#1, the one-dimensional line sensor LM is then initialized (to clearcharges from a charge accumulating unit and a transfer unit in the CCD)at step #2, and a timer II (as will be described later) is reset andstarted at step #3, followed by the resetting of various flags(including registers) at step #4.

At subsequent step #5, an accumulating subroutine is executed to causethe line sensor LM to start its accumulation. The details of thisaccumulating subroutine are shown in FIG. 8.

Upon the start of the subroutine of FIG. 8, and at step #240, the timerI is preset with the maximum charge accumulating time To of the linesensor LM, followed by the start of accumulation at step #241. Atsubsequent step #242, the interruption of the terminal INT1 caused by acompletion of the accumulation incident to the attainment of a saturatedcondition by the line sensor LM is enabled. The interruption of thetimer I as a result of the passage of the maximum charge accumulatingtime To is also enabled.

Accordingly, the accumulation can be halted either by the interruptionINT1 resulting from the monitoring of the charge accumulation or by theinterruption of the timer I resulting from the passage of the maximumcharge accumulating time To, the details of which are disclosed in, forexample, U.S. Pat. No. 4,550,993.

At step #243, a decision is made to determine if the motor MO forshifting the lens is in a predetermined high speed condition HS. If themotor MO is in the predetermined high speed condition HS, it means theaccumulation started during the shifting of the lens and, therefore, thecontents of the event counter EVC at the time of starting theaccumulation is set in a register π0, followed by the return to the mainroutine.

In the accumulation subroutine, charge accumulation can be started onlyif the rotational speed of the motor MO is stabilized, namely the motorMO is in the predetermined high speed condition HS. The reason will beexplained below in detail.

In the embodiment, the charge accumulation and the subsequent focusingcondition calculation are performed in parallel with a shifting of thelens so as to shorten the time required for an automatic focusingoperation. If the shifting speed of the lens changes during the chargeaccumulation, it is impossible to precisely calculate the shiftingamount of the lens that occurs during the charge accumulation.Therefore, the charge accumulation is started only when the rotationalspeed of the motor MO is stabilized. In order to calculate the shiftingamount of the lens that occurs during the charge accumulation, thecontents of the event counter EVC at the time of starting the chargeaccumulation are set in the register π0 at step #244.

Should the motor MO not be in the predetermined high speed condition,there is no concern with lens shifting for AF operation, and therefore,the program returns from step #243 to step #6 of the main routinewithout step #244 effected. Referring to FIG. 2, and at step #6, adecision is made to determine if the content of the timer II hasexceeded 20msec., and if the timer II has not yet exceeded 20msec., await condition is resumed. During this wait condition, the lightmeasuring circuit is stabilized. Once an excess over 20msec. has beenconfirmed at step #6, the program flow proceeds to step #7 at which timethe A/D converting operation is enabled so that the A/D conversion cantake place cyclically. Then, an AE routine is executed subsequent tostep #7.

The AE routine starts from step #10 at which time lens data is inputtedfrom the lens circuit LEC through the serial data bus SDB. At subsequentstep #11, film sensitivity data (ISO) of the film is inputted from thefilm sensitivity output unit ISD.

Then, if a flag AIF is "0", a measured light value is inputted, but ifit is "1", corresponding to no measured light value being inputted, theprogram flow proceeds to step #14 at which an exposure calculation iscarried out.

The flag AIF is provided for indicating that automatic focusingoperation has been completed in the AF mode. When the automatic focusingoperation including the focusing condition detection and the lensshifting operation is terminated (called focus lock) in response to thein-focus detection in the AF mode, the flag AIF is set to "1" at step#110 in FIG. 4. This focus lock is shown in FIG. 4, as the programproceeds from step #105 to AE routine without starting the chargeaccumulation. Furthermore, if the flag AIF is discriminated to be set to"1" at step #12, the following step #13 is skipped. Therefore, if thefocus lock is performed in the AF mode, the light value is not inputtedto the microcomputer MC. Thus, the light value already inputted under AFmode is locked in the microcomputer MC (called AE lock).

On the other hand, no focus lock is effected under the PF mode even whenthe in-focus condition is detected (see FIG. 5, PF routine). To shift tothe AE routine after the accumulation subroutine is performed at step#151, the flag AIF is set to "0" (at step #145a in PF routine of FIG. 5)in order to permit the measured light value to continually be inputtedso that, even though the sutter release operation is started, the AEcontrol can be effected according to a result of the AE calculationbased on the latest measured light value.

After the AE calculation at step #14 in FIG. 2, the result of the AEcalculation is displayed through the display unit DSP at step #15.

Then, after a flag "AE Completion" indicative of the completion of theAE calculation has been set to "1" at step #16, a decision is made atstep #17 to determine whether or not a flag "CCD Completion" associatedwith the completion of the accumulating operation of the line sensor LMhas been set.

In the preferred embodiment, data processing for automatic focusdetection and data processing for automatic exposure control areperformed sequentially in a single microprocessor MC at differenttimings. Namely, the data processing for automatic exposure control isperformed from step #10 to step #15 in FIG. 2, while the data processingfor automatic focus detection, necessary for both the AF mode and the PFmode, is performed in the DFA routine shown in FIG. 3 to the AF routineshown in FIG. 4 or to the PF routine shown in FIG. 5. The chargeaccumulation is repeated in parallel with the data processing forautomatic focus detection and the data processing for automatic exposurecontrol. Therefore, the time required only for the charge accumulationof the line sensor LM is not provided for. Thus, the accomplishment of ahigh speed operation until the shutter release operation is enable,depends on a problem of whether processing should be selected after thecharge accumulation is completed, between the data processing forautomatic focus detection and the data processing for automatic exposurecontrol. The step #17 in FIG. 2 is provided as a countermeasure againstthe above problem.

This countermeasure is achieved as follows: in a flow of the processsubsequent to the INT1 interruption shown in FIG. 3, executed when theinterruption of the terminal INT1 is enabled upon completion of theaccumulation at step #242 of the accumulating routine of FIG. 8, datafrom the line sensor LM for which accumulation has been completed isdumped at step #58 for the calculation of the AF data processing routineDFA; and after a decision has subsequently been made at step #59 todetermine whether or not the flag "AE Completion" set in accordance withthe AE completion at step #16 has been set up: the AF data processingroutine DFA is immediately resumed if the flag "AE Completion" has beenset up, but if the flag "AE Completion" has not been been set up, theprogram flow returns to the AE routine of FIG. 2 and, then after theremaining processes have been executed, shifts to the AF data processingroutine DFA.

Therefore, arrangement has been made so that when in the AE routine ofFIG. 2, the AE operation has been completed, since the program flowneeds to be shifted immediately to the AF data processing routine DFA ofFIG. 3. If the AE completion resulted after the return to the AE routineas a result of the AE incompletion subsequent to the dumping of data, aflag "CCD Completion" associated with the completion of the dumping ofthe accumulated data is set up at a step #61 in the course of a linereturning to the AE routine of FIG. 2 subsequent to the determination atstep #59 (FIG. 3) of the AE incompletion. Depending on whether or notthat flag "CCD Completion" has been set up at step #17 of FIG. 2 theoperational status of said AE completion is discriminated so that, ifthe flag "CCD Completion" has been set up, the program flow canimmediately proceeds to the AF data processing routine DFA. If the flag"CCD Completion" has not been set up at step #17, a switchdiscriminating subroutine at step #20 and an end discriminatingsubroutine at step #21 are successively executed, and conditionscorresponding to the results of these discrimination are resumed.

The switch discriminating subroutine at step #20 is illustrated in FIG.9. This subroutine is for the purpose of determining an operatingcondition by discriminating the condition or change of any one of themode selector switch AFS and the PF switches PFS1 and PFS2. The switchdiscriminating subroutine is provided at various places in the programflow of the illustrated embodiment together with the end discriminatingsubroutine. At the outset, at step #260, a decision is made to determineif the PF mode is switched over to the AF mode. If it has been switched,the display unit FDS (FIG. 1) is turned off so that under the PF mode,display of both the direction of defocus detected and the in-focuscondition is effected at all times, while only the in-focus displaysegment c is turned on under the AF mode when in the in-focus condition.Then at step #267, a motor stop subroutine is executed to stop the motorMO, followed by the return to the main flow so that the drive of themotor MO can be re-started by operation under the AE mode. The motorstop subroutine is shown in FIG. 10 and is such that a motor brake isactivated at step #250 and, after the passage at step #251 of a timerequired for the motor MO to be brought to a complete halt, the motor MOis turned off at step #252.

Should the result of decision at step #260 in FIG. 9 have indicated thatthe mode has not been switched over to the AF mode, a decision is madeat step #262 to determine if the AF mode has been switched over to thePF mode, and if it has been switched, the motor stopping subroutine atstep #267 is executed to stop the motor MO, followed by the return tothe main flow so that the drive of the motor MO can be re-started byoperation under the PF mode. If it has not been switched, the step #262is followed by step #263 at which a decision is made to determine if themode has been the PF mode.

If the camera is in the PF mode, and if both of the PF switches PFS1 andPFS2 are found opened at respective steps #265 and #266 indicating thatno command is made to effect the lens shifting, the motor stopsubroutine at step #267 is executed to stop the motor MO, followed bythe return to the main flow. Should any one of the PF switches PFS1 andPFS2 be closed, the motor MO need not be stopped and, therefore, theprogram flow returns direct to the main flow.

Should the result of decision at step #263 have indicated the AF mode, adecision is made at step #264 to determine if a flag LCF indicative of alow contrast is "1". If it is "1", it means that the AF operation lacksa reliability because of the low contrast. Whether or not it is setunder the PF mode, in which focusing is possible at the will of aphotographer, is reconfirmed through steps #265 and #266 and, if none ofthe PF switches PFS1 and PFS2 is closed, the motor MO is stopped at step#267, followed by the return to the main flow. In the event that any oneof the PF switches PFS1 and PFS2 has been closed, and if the lowcontrast flag LCF is not "1", the program flow returns to the main flowwhile the controlled condition of the motor MO is maintained as it is.

The end discriminating subroutine of step #21 in FIG. 2 is shown in FIG.11 and is used to determine whether the lens is brought to a terminationat the infinity position, at the closest available position during thelens shifting, or whether the lens is forcibly stopped. The motor MO isbrought to a halt once one of the foregoing conditions has beendetected. To this end, a decision is made at step #270 to determine ifthe motor MO is turned on, and if it is not, no process is neededallowing the program flow to return to the main flow. Should the motorMO be turned on, a subsequent decision is made at step #271 to determineif a near zone flag NZF is "1". This flag is set up when the lens isdriven at low speed and will be "1" when the lens is at a near zoneclose to the in-focus position and the speed of movement has beenswitched over to a low speed. The near zone flag is also set when thelens has approached the in-focus position while under the PF mode wherethe lens is driven at low speed so that the lens can be accurately andnaturally brought to a halt at the in-focus position.

If the flag NZF is "1", the program flow proceeds to step #272, but ifit is not, the program flow proceeds to step #273. At step #272, thecontents of a register ECR, adapted to monitor the lens shifting amountin the near zone, are set in a register ENRo. At step #273 the contentsof the event counter EVC, adapted to monitor the lens shifting amount atthe time the lens is shifted at a predetermined high speed, is set inthe register ENRo. This shifting amount ENRo is, at subsequent step#274, compared with the shifting amount ENR1 set in a register ECR orthe event counter EVC during the previous decision.

This subroutine is repeated at a predetermined cycle, and if ENRo=ENR1,it means that the lens is brought to a halt at the end with no changehaving occurred in the lens shifting amount since the previous decision.Therefore, the motor stop subroutine is executed at step #277 to stopthe motor MO. At subsequent step #278, a decision is made to determineif the low contrast flag LCF is "1". If it is not "1", one of thedisplay segments a and b of the display unit FDS which corresponds tothe direction of shifting of the lens is energized to blink at step #279thereby to provide an end warning display. Then, after an end flag ENFhas been set up at step #280, the program flow returns to the main flow.

Where the result of decision at step #278 has indicated that the lowcontrast flag LCF is "1", both of the display segments a and b remainenergized to blink, and after the flag ENF has been set to "1" at step#280, the program flow returns to the main flow.

Should the result of decision at step #274 have indicated ENRo≠ENR1, itmeans that the lens has been moved. Therefore, step #275 takes place atwhich the contents of the register ENRo in which data of the lensshifting amount at that time are transferred to the register ENR1.Thereafter, the end flag ENF is reset to "0" at step #276 and the endwarning display is switched off at step #281, followed by the return tothe main flow. The end flag ENF is reset and the end warning display isswitched off resolution of the end condition caused by the fact thateither the motor is reversed during the end condition or by the factthat a lens halted condition is removed.

Referring to FIG. 2, after the execution of the switch discriminatingsubroutine of FIG. 9 at step #20 and execution of the end discriminatingroutine of FIG. 11 at step #21, step #22 takes place. At step #22 adecision is made to determine if the shutter release switch S2 has beenclosed in order to ascertain whether or not the shutter releaseoperation has gone through the second stage.

Where the shutter release switch S2 is opened, step #25 takes place atwhich a decision is made to determine if any one of the switched S1,PFS1 or PFS2 is closed, that is, if a photographing operational of thecamera is continued. Should one of these switches S1, PFS1 or PFS2 beclosed, the AE routine is resumed in view of the fact that the shutterrelease operation has not occurred, corresponding to the second stage inwhich the switch S2 is closed.

Where all of the switches S1, PFS1 and PFS2 is opened, this means thatthe photographing operation of the camera is released or interrupted.Therefore, a stop routine is resumed. After the initiation of the stoproutine, at step #30, the power source GV is inactivated, followed bythe inhibition of the A/D conversion in the light measuring circuit andA/D converter LAD at step #31. Then at step #32, all of the displayelements are deenergized followed by the motor stop routine at step #33to stop the motor MO. At subsequent step #34, interruption of any one ofthe terminal INT1, the timer I and a counter are disabled. Interruptionof the terminal INT0 is enabled at step #35 so that the microcomputer MCcan be brought to a low electric power consumption state whilecompleting the control.

If the result of decision at step #22 has indicated that the shutterrelease switch S2 is closed, the program proceeds to step #23 at which adecision is made to determine if the shutter release is possible, thatis, to determine if it is in the in-focus condition (Step #109 of FIG.4) under AF mode, to determine if it is low contrast (Step #199 of FIG.6), or to determine if it is under the PF mode (Step #140 of FIG. 5). Ifthe shutter release is possible, a decision is made at step #24 todetermine the state of the switch S4 which is adapted to be opened uponcompletion of the shutter charging. When the switch S4 is closed, theprogram proceeds to step #25 so that, depending on the operatingconditions of the switches S1, PFS1 and PFS2, the return to the AEroutine or to the initial condition can be subsequently accomplished.

When the switch S4 is open, the program flow proceeds to step #40 atwhich the motor stop subroutine is executed to bring the motor MO to ahalt, followed by the deenergization of a display of focusing conditionat step #41 in order to allow the photographing operation to beaccomplished under AE control at step #42. Then, during a period fromthe time of completion of an exposure control operation and until theswitch S4 is closed, step #43 is repeated until the switch S4 is closed,Step #44 then takes place at which a wait condition is established untilthe optical system of the camera is ready to enable the lightmeasurement and the focus detection. The shutter release is thendisabled at step #45, a flag "AE Incompletion" indicating theincompletion of the AE operation is set up at step #46, and theaccumulating routine is executed at step #47 to effect the chargeaccumulation of the line sensor LM in readiness for the next succeedingfocus detection.

This is for the purpose of enabling continuous shooting by allowing forautomatic preparation for a subsequent photographing operationsubsequent to each preceding photographing is automatically made.

Hereinafter, a main routine beginning from the start of the interruptionprocess of the timer I or the terminal INTO and ending at one of the PFand AF routines after the execution of the AF data processing routineDFA will be described with particular reference to FIG. 3.

When the interruption of the timer I is effected, a decision is made atstep #49 to determine if it is the interruption effected by the timer Iduring the accumulating operation. If it is in the accumulatingoperation, it means that the maximum accumulating time To has passed(Steps #240 to #242 to FIG. 8), and therefore, at step #50 theaccumulation is forcibly halted, followed by step #54.

It is to be noted that the time I is utilized not only for controllingthe maximum accumulating time, but also for counting the time which willpass from the start of the motor and until the motor attains thepredetermined high speed condition and the time which will pass from thestart of calculation of the focus detection and until the start of theaccumulation.

Where the interruption of the terminal INT1 is effected, it means thatthe accumulation has been completed within the maximum accumulating timeTo and, therefore, step #54 takes place.

At step #54, a time component corresponding to the count made by thetimer I during a period between the start of accumulation and the end ofthe accumulation time To, and the time so subtracted is set in aregister to as an accumulating time.

This remaining accumulation time is used for the purpose of determininga wait time, obtained by subtracting the remaining accumulating time tofrom the data processing time required to carry out the AF processing.The wait time is the amount of time to be elapsed between the start ofthe data processing and the timing at which the next charge accumulationis to be started, so that the charge accumulation for the nextsucceeding data processing which is to parallel the data processing canbe completed at a predetermined timing slightly delayed relative to thetime at which the present data processing is completed.

The setting of the timing for the start of the accumulating operation isnecessitated by the following factors. If the charge accumulation isstarted simultaneously with the AF operation of the microcomputer MC,the timing of completion of the charge accumulation deviatesconsiderably from the timing at which the microcomputer Mc is brought ina condition ready to perform a data dumping. If the data dumping isdelayed until the accumulation is completed, no accurate data dumpingcan be carried out because of leakage of current and other reasons.Moreover, if the accumulation is effected each time an accumulationcompletion signal is inputted, a problem will arise where a large numberof interruptions are effected as a result of the completion of eachaccumulation in a short time at a high brightness. Therefore, the timerequired to effect a data processing operation for the AF tends to beprolonged because of unnecessarily repeating the process accumulation.

In view of the above, it is assumed that the brightness will not changemuch, and that the time required for the AF data processing operationwill not change much regardless of the selected mode such that a data T1to can be obtained by subtracting the remaining accumulating time tofrom the time T1 and storing the result in time I. The AF dataprocessing operation is counted by the time I (Step #70 of FIG. 3) atthe time of start of the AF data processing operation so that, upon thecompletion of this counting, the next accumulation can be started. Thisis such that step #51 is executed because it is not during theaccumulating operation when the interruption is effected by the timer I,and the accumulating operation is started during the execution of thesubroutine of step #53 because it is during the AF operation, afterwhich the routine for the AF operation is resumed.

In this way, unless the brightness of the target object to bephotographed changes abruptly, the completion of the AF data processingoperation is immediately followed by the completion of the accumulationand, therefore, data can be taken in with no waste of time and with noerror resulting from the leakage of current.

After the setting of the accumulating time for the timing of start ofthe accumulating operation, a decision is made at step #55 to determineif it is the interruption of the terminal INT1 applied during the AFoperation. This is for the purpose of determining whether or not thebrigtness of the target object has abruptly changed. If the accumulationis completed much earlier than a predetermined timing and before thecompletion of the AF data processing operation then despite the factthat the accumulation has been started at said timing determined on thebasis of the previous accumulating time, the brightness of the targetobject becomes much brighter than that during the previous accumulationand such data cannot be used for the subsequent AF data processingoperation. Thus, it is deemed that the brightness has abruptly changedduring the AF operation, and the program returns after the accumulationhas been re-started during the execution of the accumulating routine atstep #53, thereby enabling the photographing operation in AF mode toonce again be performed with no difficulty even though the brightnesshas abruptly changed. If the terminal INT1 is not applied during the AFdata processing operation at step #55, it is deemed that no abruptchange has occurred in brightness and the program flow proceeds to step#56.

At step #56, a decision is made to determine if the motor MO is in thepredetermined high speed condition HS. If it is in the predeterminedhigh speed condition, the contents of the event counter EVC thenmonitoring the lens shifting amount at the time are set in a register π1as data representative of the timing of completion of the accumulationparalleling the AF operation. And, after the data set in the register π1is useable in correcting the amount of movement of the lens during theaccumulating operation as well as that set in the register π0 at step#244 of FIG. 8, the program proceeds to step #58. On the other hand, ifthe motor MO is not in the predetermined high speed condition, theaccumulation is taking place while the lens is held still. Therefore acorrection for lens movement need not be effected and the programproceeds directly to step #58. At step #58, the data from the linesensor LM is dumped.

After the data dumping, step #300 takes place at which a decision ismade to determine if a flag SCF is "1". This flag SCF is set to "1" whenthe AF processing routine is executed, for the purpose of thecalculation for the focus detection, subsequent to the completion of thefirst dumping of the accumulation data and before the start of the timecounting for the next accumulation (Step #70 of FIG. 3). It is thereforeis possible to determine if the first data dumping and the subsequent AFdata processing operation have been performed by checking the flag SCF.The flag SCF is set to "1" when, as a result of the AF routine of FIG. 4being executed upon the completion of the data dumping attributable tothe first accumulation and also upon the completion of the AF dataprocessing operation based thereon. The program proceeds to step #138and the motor MO is retained activated until the interruption of theterminal INT1 or the timer I attributable to the second accumulation.

In connection with this process, when the result of decision at step#300 indicates that the flag SCF is "1", this means the completion ofthe second accumulation and, therefore, the motor M is turned on at step#302. Thereafter, and after a time T2 required for the motor MO to bebrought in the predetermined high speed condition has been set in thetimer I at step #303, the interruption of the timer I is enabled at step#304 so that the accumulating operation at step #53 can be initiatedafter the motor MO has been brought to the predetermined high speedcondition.

At step #305 and #306, the difference N-Nn between the defocus amount Nobtained at step #90 on the basis of the first accumulation and the nearzone width Nn, that is, the amount of shifting of the lens required forshifting the lens into the near zone, is successively set in the eventcounter EVC and the register π1.

Thereafter, at step #301, the interruption of the event counter EVC isenabled, followed by step #59.

Thus, arrangement has been made so that during the AF data processingoperation subsequent to the completion of the first accumulation, thestart of the motor MO can be withheld until the completion of the secondaccumulation. Upon the completion of the second accumulation, the motorMO can be started and the calculation for the second focus detection canbe performed. This is because, if the accumulation is effected at thetime of start of the motor MO, no correction of the amount of movementcan be accomplished. Also, although a relatively long time is requiredfor the motor to be brought the predetermined high speed conditionsubsequent to the start thereof, no waste of time will occur becausethis time can also be used for the second focus detection calculation.Moreover, if the target object undergoes a movement or any other motion,it is preferable to shift the lens on the basis of data as updated aspossible because the lens can be brought to the in-focus position athigh speed.

The contents of the event counter EVC can be subtracted in response topulses input from the encoder EC through the terminal CKIN and inaccordance with the drive of the motor MO. When the contents of theevent counter EVC become "0", the lens is deemed to have arrived in thenear zone accompanied by the interruption of the event counter EVC sothat the interruption of the event counter EV in FIG. 7 can enter aprocessing flow.

Referring back to FIG. 3, the time T2 necessary for the motor MO to bebrought to the high speed condition from start of driving the motor MOis set in the timer I at step #303. Thereafter, when the interruption ofthe timer I occurs after the timer I interruption has been renderedpossible at step #304, it means that the focus detecting operation forthe AF has been completed and the AE routine is repeated. However, inthe case of the timer interruption processing flow, it means neither theaccumulating operation nor the AF operation and, accordingly, a flag"HS" indicative of the predetermined high speed condition is set at step#52 and the accumulation is started at step #53, followed by the returnto a return address in the AF routine thereby to provide the basis forthe determination of the motor MO being in the predetermined high speedcondition. .Iadd.The means for driving the motor 40 is a drive circuitMD which will drive the motor MO until it reaches a predetermined speedcondition. The determining means for providing a determination when themotor reaches a predetermined speed condition is a timer I set to a timeT₂ at step #303.

On the other hand, if the result of decision at step #300 indicates thatthe flag SCF is "0", the above described process need not be performedand the program proceeds to step #59.

Depending on whether or not the flag "AE Completion" has been set up atstep #59, the program returns after the flag "CCD completion" has beenset up as hereinbefore described, or the AF data processing routine DFAis executed.

Where the AF data processing routine DFA is executed, a decision is madeat step #60 to determine if it is under the PF mode, and if under the PFmode, the program returns via step #61, but if not under the PF mode,the program proceeds to step #610 to determine if the low contrast flagLCF is "1".

This flag LCF indicates low contrast. If the contrast of lightinformation entering the line sensor LM from the target object is low,the focus detection is difficult or impossible to perform and itsfunction cannot be reliable. The flag LCF will be "1" when at lowcontrast and "0" when it is not. The flag "CCD Completion" is set to "1"at step #61 either when the PF mode is discriminated to be set at step#60 or when the low contrast flag LCF is discriminated to be set up atstep #610. The AE routine is executed thereafter. This step #61 isprovided for avoiding undesirable operation that the microprocessor MCexecutes only the AF data processing routine without executing the AEroutine after the latter has been once performed first.

When the flag LCF is determined at step #610 to be "1", the return takesplace via step #610, but when it is determined to be "0", the AF dataprocessing routine DFA is executed.

During the execution of this routine, the resetting of the flag "CCDCompletion" takes place at step #65 if it has been set up, followed by adecision at step #66 to determine if the flag FDF is "0". This flag FDFis adapted to be "0" when this routine is executed for the first time,but to be "1" when it is not (Step #69), and when it is "0", the programflow proceeds to step #307. At step #307, the first accumulation and thedata dumping have been completed and it is in position before thecalculation of the focus detection during the execution of the AF dataprocessing routine DFA is carried out, and therefore, a flag SCFindicative thereof is set to "1". At subsequent step #69, the flag FDFis set to "1". Subsequently at step #70, data representative of a timerequired to pass before the start of accumulation of T1-to is set in thetime I, the interruption of the timer I is enabled at step #71, and atstep #72 a shift amount calculation is performed thereby to resume theAF data processing operation.

While the details of step #72 during which the shift amount iscalculated; step #79 during which the reliability of the focus detectiondue to the low contrast is determined, step #80 during which theinterpolation is effected; and step #81 during which the conversion ismade into a defocus amount are disclosed in U.S. Pat. No. 4,636,624 andsome other publications and, therefore, are not herein discussed, theshift amount calculation is such that the shift amount of an imagerelative to the other image is calculated for the purpose of detectingthe interval between two images formed by separator lenses on a lightreceiving surface of the line sensor LM. The Interpolation is carriedout in such a way as to finely interpolate the shift amount, obtained bythe above shift amount calculation, thereby to detect the intervalbetween the two images. The conversion into the defocus amount is forthe purpose of converting the amount of deviation from the imageinterval in an in-focus condition of the image interval, that isobtained by the interpolation, i.e., the amount of deviation from thein-focus condition in a direction perpendicular to the optical axis,into a amount of deviation from the in-focus condition in a directionparallel to the optical axis.

Where the passage through step #66 is not for the first time and,therefore, the flag FDF is "1", the program flow proceeds to step #67 atwhich a decision is made to determine if the motor MO is in thepredetermined high speed condition. If it is not in the high speedcondition, a decision is made at step #68 to determine if the lowcontrast flag LCF is "1". Where the result of decision at step #67indicates that the motor MO is in the high speed condition, and wherethe result of decision at step #68 indicates that the flag LCF is "1",in order for the accumulation for the subsequent data processing toparallel the AF data processing which continues, the program flowproceeds to step #70 at which the timer I is set and then to step #71 atwhich the interruption of the timer I is enabled, followed by the shiftcalculation at step #72.

On the other hand, where step #68 is resumed as a result of decision atstep #67 indicating that the motor MO is not in the predetermined highspeed condition, and where the result of decision at step #68 indicatesthat the low contrast flag LCF is not "1", the program flow proceeds tostep #72. This is because no accumulating operation of the line sensorLM is carried out if the motor is not in the predetermined high speedcondition, but the reliability exists, and therefore, steps #70 and #71are not executed.

Subsequent to the shift calculation at step #72, an operation similar tothe program flow from step #20 to step #25 of the main routine of FIG. 2takes place during a program flow from step #73 to step #78. Only whenone of the switches S1, PFS1 and PfS2 is closed at step #78, that is,only when it is confirmed that the photographing operation is to becarried out, the program flow subsequent to the low contrastdetermination at step #79 is executed.

While only when the result of decision at step #79 has not indicated thelow contrast the program flow proceeds to the interpolation at step #80and then to the defocus conversion at step #81, when it has indicate thelow contrast, a low contrast routine shown in FIG. 6 is executed sothat, only when one of the PF switches PFS1 and PFS2 is closed, thecontinuation of the photographing operation is possible while the lensis shifted by the motor MO. When none of the switches PFS1 and PFS2 areclosed, the motor is stopped to interrupt the motor drive of the lens.

Referring to FIG. 6, the low contrast routine shown therein will bedescribed. At step #198, an in-focus flag AIF is rendered to be "0", andthen at step #199, the shutter release is enabled while establishing ashutter release priority condition. At step #200, a low contrast warningis activated. That is, both of the display segments a and b shown inFIG. 1 are energized to blink. Thereafter, at step #201, a decision ismade to determine if the PF switch PFS1 is closed. If it is closed, thelens shifting direction is fixed at step #202 to a backward direction,but if it is not closed, a decision is made at step #203 to determine ifthe PF switch PfS2 is closed. If it is closed, the lens shiftingdirection is fixed at step #204 to a forward direction, but if it is notclosed, it means that the PF mode is not continued and, therefore, nomotor drive is needed. In such case, a decision is made at step #210 todetermine if the motor MO is activated and, if it is not activated, itremains as it is, but if it is activated, the motor stop routine isexecuted at step #211 to stop the motor MO, followed by step #209. Atstep #209, the low contrast flag LCF is set up, and, after the flag SCFhas been rendered to be "0" at step #212 in such a way as to execute theinitial accumulation of the line sensor LM, either the interruption ofthe terminal INT1 or the interruption of the timer I resulting from there-accumulation of the line sensor LM is waited for, a normal operationfrom the flowchart of FIG. 3 being subsequently resumed when theinterruption is effected.

Subsequent to step #202 or step #204, a decision is made at step #205 todetermine if an end flag ENF "1" is set up, and, if it is not "1", themotor MO is activated at step #208 to effect the motor drive of the lensunder the PF mode, followed in succession by step #209 and step #212 tocontinue the focus detecting operation.

If at step #205 the end flag ENF "1" has been set up, a decision is madeat step #206 to determine if the driving direction of the motor MO hasbeen reversed relative to that at the time of end detection. If it hasnot been reversed, the AE routine is resumed, but if it has beenreversed, the end flag ENF is reset to "0" at step #207. Subsequent tostep #207, the program flow of step #208 et seq. takes place, as is thecase where the result of decision at step #205 has indicated the endflag ENF has been set up, to continue the motor drive of the lens andthe focus detecting operation.

Accordingly, when the low contrast condition is discriminated,regardless of whether the mode is the AF mode or whether it is the PFmode, the driving direction is determined depending on the respectivestates of the PF switches PFS1 and PFS2, so that the focus detection canbe repeated while the lens is shifted.

Referring to FIG. 3, where the result of decision at step #79 does notindicate the low contrast, the interpolation at step #80 and the defocusconversion at step #81 are sequentially performed, followed by step #82at which a decision is made to determine if the low contrast flag LCF isrendered to be "1" as a result of the previous low contrastdetermination. If the low contrast flag LCF was not rendered to be "1"it means that reliable AF information is available end, therefore, atstep #90, the lens drive amount is calculated. (The details thereof aredisclosed in U.S. Pat. No. 4,509,842).

Should the flag LCF as determined at step #82 be rendered to be "1", itis returned to "0" at step #83, followed by a decision at step #84 todetermine whether or not it is the AF mode. In the case of the AF mode,the shutter release is disabled at step #85. Subsequent to step #85, orin the case where the result of decision at step #84 does not indicatethe AF mode, step #86 takes place at which a warning display of the lowcontrast is turned off. Thereafter, a decision is made at step #87 todetermine if the motor MO is activated. If the motor MO is notactivated, the drive amount calculation is carried out at step #90, butif it is activated, the motor stop subroutine shows in FIG. 10 isexecuted at step #88 to stop the motor MO and, then, after theaccumulating routine shown in FIG. 8 has been executed at step #89, theprogram flow returns to the AE routine.

At step #90, the lens drive amount No is calculated on the basis of thedefocus amount obtained at step #81. then, at step #91, a decision ismade to determine if the motor is in the predetermined high speedcondition. If the motor is in the predetermined high speed condition,the contents of the event counter EVC is transferred at step #92 to aregister π2 as lens position information at the time of completion ofthe AF operation, and subsequently, at step #93, a correctingcalculation is carried in the following manner.

    N=NO-[1/2(π0-π)+(π1-π2)]

This is disclosed in detail in U.S. Pat. No. 4,509,842 and, therefore,will not be herein discussed. However, the correcting calculation is forthe purpose of carrying out a correction wherein the amount of movementof the lens within the range in which no drive amount can be calculated,that is, the amount 90 0-π1 of movement during the initial accumulatingoperation, and the amount π1-π2 of movement during the AF processingoperation are subtracted from the lens drive amount No obtained at step#90, and, in the case of the initial accumulating operation takingplace, the half of the difference π0-π1, that is, an intermediate pointthereof, is taken as the lens position.

After the correcting calculation at step #93, a decision is made at step#94 to determine if it is under the Pf mode, and if not under the PFmode, it means the AF mode is taking place, and, therefore, the AFroutine of FIG. 4 is executed. If under the PF mode, the PF routine ofFIG. 5 is executed.

On the other hand, if the result of the decision at step #91 does notindicate the predetermined high speed condition, step #308 takes placeto determine if the flag SCF is "1", and if it is not "1", the programflow proceeds to step #94. However, if it is "1", another decision ismade at step #330 to determine if the motor is activated and the lens istherefore being shifted. Should the motor not be activated, it meansthat a result of the first focus detection has been completed and,therefore, the program flow proceeds to step #94. On the other hand, ifthe motor is activated, it means that a result of the second focusdetection has been completed and, therefore, after the flag SCF has beenreturned to "0" at step #309, the contents of the event counter EVC thenmonitoring the lens shifting amount is transferred at step #310 to theregister π2 as the lens position information at the time of completionof the AF processing operation. Therefore, at step #311, No-(π1-π2) iscalculated to correct the lens shifting amount during the AF dataprocessing operation, after which step #94 takes place. This is becausethe lens shifting is inhibited (if SCF=1 at step #138 of FIG. 4) evenduring the second accumulating operation and, upon the completion of thesecond accumulating operation, the motor is started (step #302 of FIG.3) to shift the lens while the calculation for the focus detection istaking place.

The AF routine shown in FIG. 4 will now be described. At step #100, adecision is made to determine if the above mentioned lens shiftingamount N is equal to or smaller than the in-focus region width N1, thatis, if the lens position is within the in-focus region, and if it iswithin the in-focus region, a decision is made at step #101 to determineif the motor MO is activated. Should the motor MO be activated, themotor stop subroutine is executed at step #102 to stop the motor MO,followed by the return to the AE routine via the accumulating routinewhich has been executed at step #103 for the in-focus conditionreconfirmation.

The in-focus condition reconfirmation is carried out for the purpose ofreconfirming whether or not the in-focus condition could have beenestablished while the lens shifting is interrupted, because thedetection of the in-focus condition while the motor MO is activated ispossible only when at the low contrast and where in the predeterminedhigh speed condition (the focus detection is not performed in low speedcondition of the motor MO). therefore, there is a great possibility thatthe brightness of the target object may abruptly change and/or anerroneous measurement may occur.

When the result of decision at step #101 indicates that the motor MO hasbeen brought to a halt, there will not arise such a problem ashereinabove described and, therefore, the in-focus condition isdetermined by the fact that the motor MO has been brought to a halt,allowing an in-focus processing operation to be executed at step #105 etseq.

At step #105, a decision is made to determine if the flag ENF is "1",and if it is "1", it means that, even though the lens has arrived at theend, the in-focus condition is established and, therefore, after an endwarning display has been turned off at step #106, the end flag ENF isreset to "0" at step #107. On the other hand, if the end flag ENF asdetermined at step #105 is "0", or subsequent to step #107, the programflow proceeds to step #108 to effect the in-focus display and, after theshutter release has been enabled at step #109, the in-focus flag AIF forthe AE lock, to be effected at the in-focus condition as hereinabovedescribed, is rendered to be "1".

At subsequent step #312, the flag SCF is returned to "0", and theinterruption of each of the timer I and the terminal INT1 is thendisabled. Thereafter, after the focus locked condition wherein theaccumulating and AF processing operations are no longer executed hasbeen established, the program flow returns to the AE routine to enablethe photographing operation.

When the program flow returns to the AE routine, and after it has beenconfirmed at step #12 that the flag AIF is "1", the AE calculation atstep #14 is performed without the inputting of the measured light valuebeing performed at step #13, thereby to accomplish the AE lock with nonew measured light input received. In other words, a one-shot AF systemis employed so that focus locked and AE locked conditions can beestablished during the in-focus condition.

Reverting to the initial step #100 of the AF routine, if the lensshifting amount N is greater than the in-focus region width Ni, it meansthat no in-focus condition is established and, therefore, the lens neednot be shifted. Therefore, in such case, a DRV routine for shifting thelens is executed. During the execution of DRV routine, and at step #115,a decision is made to determine if the end flag ENF is "1". When theflag ENF is "1", another decision is made at step #116 to determine ifthe lens shifting direction is reversed, and if it is not reversed, theaccumulating routine at step #117 is followed by the AE routine tocontinue both of the AE and AF operations.

On the other hand, if the lens shifting direction is reversed, thedisplay of the end warning is turned off at step #118, followed by step#119 at which the end flag ENF if returned to "0", after which does step#120 take place. If the result of decision at step #115 indicates thatthe flag ENF is "0", the program flow immediately proceeds to step #120.

At step #120, a decision is made to determine if the lens is in thefront focus condition. If it is in the front focus condition, it isdetermined that the lens should be shifted in the backward direction atstep #121, but if it is not in the front focus condition indicating thatthe lens is in the rear focus condition, it is determined that the lensshould be shifted in the forward direction at step #122. Subsequent toeither step #121 or step #122, the lens is shifted upon the activationof the motor MO so as to approach the in-focus position.

At step #123, a decision is made to determine if the lens shiftingamount N is equal to or smaller than the near zone width Nn, that is, ifthe lens is within the near zone width Nn. If the lens is within thenear zone width Nn, step #124 takes place to determine if the motor MOis activated, and if the motor MO is activated, the motor brake isactuated at step #125 to bring it into a predetermined low speedcondition. On the other hand, if the motor MO is not activated, themotor MO is activated at step #126 to shift the lens towards thein-focus position, followed by steps #127 and 128. The lens shiftingamount N towards the in-focus position is set in a register ECR at step#127, and the event counter EVC is set to "1" at step #128, so that itcan be used for controlling the motor MO to the low speed conditionwhile the event counter EVC is "1". .Iadd.The means, operating when amovement amount of the photography line towards its in-focus position islarger than a predetermined value, for controlling the microprocessor MCand the motor MO includes the decisional step #123. .Iaddend.

Subsequently, at step #129, the resetting of and the start of the timerII are carried out at step #130, the interruption of the event counterEVC is enabled so that when the lens is shifted by an amountcorresponding to one pulse generated from the encoder EC, theinterruption of the event counter EVC can be effected to initiate theevent counter interrupting process flow shown in FIG. 7. At subsequentstep #131, the near zone flag NZF is rendered to be "1". Then, at step#314, the flag SCF is returned to "1", and at step 315, the interruptionof the timer I and the terminal INT1 is disabled, followed by theexecution of the AE routine. This is for the purpose of inhibiting bothof the accumulation and the AF calculating operation from taking placebecause, before the in-focus is established, the lens is not shifted ata constant speed.

If the result of the decision at step #123 indicates that the lensshifting amount N is greater than the near zone width Nn, the programflow proceeds to step #132 at which the near zone flag NZF is renderedto be "0", followed by a decision at step #133 to determine if the motorMO is activated. If the motor MO is not activated, as determined at step#133, it may be considered the AF operation based on the initialaccumulation and, therefore, step #138 takes place to determine if theflag SCF is "1". If the flag SCF is "1", it means the AF operation istaking place based on the initial accumulation and, therefore, a waitcondition is established to wait for the interruption of the time I orthe terminal INT1 until the second accumulation so designed as toterminate a little beyond the timing of completion of the AF operationparalleling therewith terminates. .Iadd.Thus, a first mode of operationis selected wherein exposure and focus control calculations can beperformed in the microprocessor MC. .Iaddend.

When the interruption is effected, the program flow from step #300 tostep #301, shown in FIG. 3, is executed to activate the motor, after thesetting of the second accumulating time in the register to and the datedumping have been performed according to the flow of FIG. 3.

Where the flag SCF, as determined at step #138, is not "1", it meansthat the AF operation based on the second accumulating operation hasbeen terminated. In order for the lens to be shifted at this stage onthe basis of the AF processing data, the motor MO is activated at step#134 in view of the fact that the flag SCF has been rendered to be "0"at step #138. Then, at step #135, the time T2 required for the motor MOto be brought in the predetermined high speed condition is set in thetimer I, and at subsequent step #136, the interruption of the timer I isenabled so that, when the motor MO is brought in the predetermined highspeed condition, the next succeeding accumulation can be initiated uponthe interruption of the timer I. Thereafter, the shifting amount N-Nntowards the near zone is set in the event counter EVC so that, by theeffect of a pulse input from the encoder EC to a terminal CKIN inaccordance with the drive of the motor MO, the value set therein can besubstrated. At step #139, the interruption of the event counter isenabled to execute the AE routine. .Iadd.Thus, a second mode ofoperation is selected wherein only an exposure control calculation isperformed in the microprocessor MC. .Iaddend.

The interruption of the event counter EVC is effected, when the contentsof the event counter EVC are reduced to "0" by said subtraction, as aresult of the arrival of lens in the near zone so that the event counterinterruption process flow shown in FIG. 7 can be executed.

Should the motor MO as determined at step #133 be activated, the programflow proceeds to step #137 thereby to execute the AE routine.

With particular reference to FIG. 5, the PF routine will now bedescribed. After the flag SCF and the flag AIF have been rendered to be"0" at step #145a, the shutter release is enabled at step #140. This isfor the purpose of obtaining a so-called shutter release priority modewherein during the PF mode the shutter release can be affected at anytime at the will of the photographer, whereas during the AF mode aso-called AF priority mode is obtained wherein the shutter release isenabled only when the in-focus condition is established. Also, in viewof the in-focus flag AIF having been rendered to be "0", no AE lock atstep #12 take place even when in the in-focus condition, and the inputof the measured light data at step #13 can be carried out at any time.

This is for the purpose that, in view of the shutter release prioritymode, the lens may be shifted even after the in-focus condition has beenestablished and the AE operation can be effected simultaneously with theAF operation in order to control the exposure on the basis of theupdated measured light data.

When the program flow proceeds to step #141, a decision is made todetermine if the lens shifting amount N is equal to or smaller than thein-focus region width Ni, that is, if the lends is within the in-focusregion. If it is within the in-focus region, it is determined whetherthe motor MO is activated at step #142. If the motor MO is determined tobe activated, step #143 takes place to execute the motor stop subroutineto stop the motor, followed by step #144 at which an in-focus numberregister IFR is reset to "0". Subsequently, and at step #147, a decisionis made to determine if the end flag ENF is "1", and if it is "1", theend warning display is turned off at step #148 and the end flag ENF isrendered to be "0" at step #149. Subsequent to step #149, or when theresult of decision at step #147 has indicated that the end flag ENF is"1", the program flow proceeds to step #150 at which the in-focusdisplay is effected. Thereafter, the accumulating routine is executed atstep #151 to effect the accumulation for the next succeeding detection,followed by the execution of the AE routine.

Where the motor MO as determined at step #142 is not activated, it maybe thought that even through the motor MO is temporarily stopped as aresult of the arrival at the in-focus position, the PF routine isexecuted with no shutter release taking place. Therefore, in order todetermine whether or not the photographer intends the motor drive, it isnecessary to determine whether one of the PF switches PFS1 and PFS2 isclosed. For this purpose, the program flow proceeds to step #155 atwhich a decision is made to determine if the PF switch PFS1 is closed,and if it is opened, whether or not the PF switch PFS2 is closed isdetermined at step #157. Should both of the PF switches PFS1 and PFS2 beopened, it is all right to leave the motor MO stopped and the programflow proceeds to step #144 at which an operation similar to thatsubsequent to the motor stop routine at step #143 is performed.

If the PF switch PFS1 is closed, it is determined at step #156 that thelens should be shifted in the backward direction, but if the PF switchPFS2 is closed, it is determined at step #158 that the lens should beshifted in the forward direction. Thereafter, at step #145, the registerIFR is incremented by 1, and a decision is made at step #146 todetermine if the contents of the register IFR is 3, that is, todetermine if, since the contents of the register IFR was 0 at the timeof the first in-focus condition, confirmation of the in-focus conditionhas been done four time. If IFR≠3, the previously mentioned operation isrepeated from step #147.

When the contents of the register IFR attains 3, the fact that one ofthe PF switches PFS1 and PFS2 is continuously depressed is acted upondespite the in-focus condition and, therefore, it means that thephotographer is trying to purposely displace the in-focus position whileeffecting the lens shifting. For this lens shifting, the direction ofdefocus is displayed at step #159 and, after the near zone flag NZF hasbeen rendered to be "1" for the low speed drive at step #160, the amountof movement Nc of the lens at a low speed is set in a register ECR atstep #161, followed by the setting of "1" to the event counter EVC atstep #162. At step #163, the resetting and the start of the timer II areeffected, the interruption of the counter is enabled at step #164, andthe motor MO is activated at step #165 to execute the AE routine.

In this way, the forced movement of the lens from the in-focus positionresulting from the continued depression of one of the PF switches fromthe continued depression of one of the PF switches PFS1 and PFS2, eventhough the in-focus condition has been accomplished under the PF mode,is carried out after the in-focus condition has been confirmed fourtimes, by executing the AE routine while the motor MO is driven by eachpredetermined amount Nc in a direction required to move the lens in adirection determined by such one of the PF switches PFS1 and PFS2.

It is to be noted that, instead of the motor MO being activated to drivethe lens when the in-focus condition has been confirmed thepredetermined number of times while one of the PF switches PFS1 and PFS2is kept closed, it may instead be possible to employ a system whereinthe motor MO can be activated upon the passage of a predetermined timewhile one of the PF switches PFS1 and PFS2 is kept closed. In this case,step #144 is to be the resetting and start of the timer II, step #145 isto be omitted, and step #146 is to be a decision to determine if thetimer II is equal to or greater than Tk (constant, For example, 2 sec.)

Referring to step #141, if it is determined that no in-focus conditionis accomplished, the in-focus flag AIF is reset to "0" at step #169, andat subsequent step #170, the direction of defocus is displayed. This isfor the purpose of enabling the photographer to selectively depress oneof the PF switches PFS1 and PFS2 according to the determination of thedrive direction in which the photographers is to move the lens towardsthe in-focus position although under the AF mode no display other thanthe display of the in-focus condition is effected, the direction ofdefocus is displayed under the PF mode even during the motor drive beingtaken place.

After a decision has been made to determine which one of the PF switchesPFS1 and PFS2 is closed, a decision is made at step #172 or #174 todetermine if the shifting direction of the lens corresponding to whichone of the PF switches PFS1 and PFS2 which has been closed conforms tothe direction of defocus, and if they conform, the DRV routine shown inFIG. 4 for the lens shifting is executed.

Accordingly, in such case, the lens can be shifted at a high speed in azone, other than the near zone as is the case during the execution ofthe AF routine, or at a low speed within the near zone, respectively, sothat the lens can be brought to the in-focus position.

Where neither of the switches PFS1 and PFS2 is closed as indicated bythe result of decision at step #171 and #173, the program flow proceedsto step #190 to determine if the motor MO is activated, and if it isactivated, the motor stop routine is then executed to stop the motor MO.

Where the result of decision at step #190 indicates that the motor MO isnot activated, step #192 takes places to determine if the end flag ENFis "1". If it is "1", the display of the end warning is turned off atstep #193, and the end flag ENF is rendered to be "0" at step #194,allowing the subsequent accumulating routine to be executed. If the endflag ENF is not "1", the program flow process to step #195. After theaccumulating routine at step #195, the AE routine is executed.

Where, as results of decision at steps #172 and #174, the direction ofthe lens shifting designated by the closure of one of the PF switchesPFS1 and PFS2 does not conform to the direction of defocus, it isnecessary to ascertain whether or not the reversal of the lens shiftingdirection has resulted from the arrival of the lens at the end. For thispurpose, a decision is made at step #175 to determine if the end flag is"1". If it is "1", the next succeeding decision is made at step #176 todetermine if both of the lens shifting direction at the time ofdetection of end, and the shifting direction designated by the closureof one of the PF switches PFS1 and PFS2, are reversed. If they are notreversed, the accumulating routine is executed at step #177, followed bythe AE routine.

Should the result of decision at step #175 indicate that the end flagENF is not "1", the near zone flag NZF is then rendered to be "1" atstep #180, followed by the process similar to the previously describedprocess from step #160 to step #165, before the program flow proceeds tothe execution of the AE routine via step #185.

If the result of decision at step #176 indicates that both of thedirections are reversed, step #178 at which the end warning display isturned off and step #179 at which the end flag ENF is rendered to be "0"take place in succession before the program flow process to step #180.

The interruption processing operation of the event counter will now bedescribed with reference to FIG. 7. The interruption of this counter EVCis enabled at step #301 of FIG. 3, steps #130 and #139 of FIG. 4 steps#164 and #184 of FIG. 5, and at step #231 of FIG. 7. When the content ofthe event counter EVC is reduced to "0", the interruption is effected toexecute the flow of FIG. 7. At the outset, at step #220, a decision ismade to determine if the near zone flag NZF is "1". If it is "0", step#221 takes place, but if it is "1", step #224 takes place. This is forthe purpose of differentiating between the interruption during a flow inwhich the near zone flag NZF is not set to "1", that is, the casewherein the lens is shifted at a high speed, and the interruption duringa flow in which the near zone flag NZF is set to "1", that is, the casewith the lens shifted at a low speed.

If the near zone flag NZF is "0", it means that the lens enters the nearzone from exterior of the near zone and, therefore, the motor brake iseffected at step 221, the near zone flag NZF is set to "1" at step #222,and the near zone width Nn is set in the register ECR at step #223. Theinterruption of timer I and that of terminal INT1 are disabled at step#234 for interrupting the data dumping of subsequent accumulation withinthe near zone.

Subsequently, at step #229, the event counter EVC is set to "1" so thatit can be utilized for the speed control. At step #230, the resettingand start of the timer II are performed, and at step #231 theinterruption of the counter is enabled, followed by the return to the AFreturn address in the case of the AF operation or the AE return addressin the case of the AE operation.

On the other hand, if the near zone flag NZF is "1", step #224 takesplace at which 1 is subtracted from the contents of the register ECR,followed by a decision at step #225 to determine if the register ECR is"0".

If the near zone flag NZF is "0", indicative of the arrival at thein-focus position, the motor stop subroutine is executed at step #232 tobring the motor MO to a halt the accumulation for the confirmation ofthe in-focus condition is started at step #233, and the return to thereturn address is accomplished in a manner similar to that describedabove.

If the result of decision step #225 indicates that the register ECR isnot "0", another decision is made at step #226 to determine if the countof the timer II is greater than a predetermined if the count of thetimer II is greater than a predetermined drive amount Tc. If it isgreater than the predetermined drive amount Tc, it means that the motorspeed is low and, therefore the motor MO is activated at step #227. Ifit is not, it means that the motor speed is high and, therefore, themotor is braked to attain a low sped at step #228. Subsequent thereto,the program flow proceeds to step #229. That is, in this region, acounter interruption is effected to the event counter when the lens ismoved an amount corresponding to the generation of a "1" pulse from theencoder, and the time required to move the amount corresponding to this"1" pulse is counted by the timer II. Therefore, if the count of thetimer II is greater than the predetermined drive amount Tc, the speed isregarded to be low and the motor MO is activated, but if it is equal toor smaller than the amount Tc, the speed is regarded to be high and themotor MO is braked to drive the lens at a low speed.

It is to be noted, that since within the near zone the dumping of theaccumulated data is inhibited and the AE routine is immediately executed(FIG. 3), the AE routine is repeated while the process of the eventcounter interruption for the motor speed control is performed.Accordingly, exposure control data based on the brightness of the targetobject immediately or at the time of the in-focus condition can beobtained.

Also, this operation is continued if it is during the focus detectingbased on the accumulated data obtained during the high speed conditionas hereinbefore described. Since the AE operation is repeated thereafteruntil the in-focus condition is accomplished, the AE lock is thereforeeffected at the in-focus condition.

Hereinafter, the exemplary sequences of operation under the AF mode willbe described.

At the outset, the switch AFS shown in FIG. 1 is closed for the modeselection. When the photographic camera is aimed at a target object tobe photographed and the shutter release button is depressed, the lightmeasuring switch S1 is closed upon the first stage of depression of theshutter release button to generate a signal with which the terminal INT0of the microcomputer MC is interrupted with the consequences that theflowchart of FIG. 2 is started from step #1.

After the initial process from step #1 to step #4, the firstaccumulation is performed during the accumulating routine at step #5 bythe line sensor LM, which has been initialized at step #2, according tothe flow shows in FIG. 8. Either after the completion of theaccumulation or after the passage of the count time to of the timer Iset at step #240, the interruption of either the timer I or the terminalINT1 is enabled, and a decision is then made at step #243 to determineif the motor MO is in the predetermined high speed. Since the motor MOhas not yet been driven, the program flow returns to step #6.

After the wait condition having taken place at step #6 until the countof the timer II reset and started at step #3 attains the preset time of20 msec. for the stabilization of the AE function, the A/D conversion ofthe light measuring circuit and A/D converter LAD for the AE control iscyclically performed to permit it to be inputted at any time, followed bthe AE routine.

During the AE routine, since, considering the case in which in-focuscondition is not accomplished because it is before the AF operation, thein-focus flag AIF is "0" at step #12 and the measured light input iscarried out at step #13, on the basis of which the AE calculation isperformed at step #14. The result of each AE calculation is displayed atstep #15 and the flag of "AE Completion" is set up at step #16, thus,completing one cycle of AE calculation.

Although a decision is made at step #17 to determine if the flag "CCDCompletion" is set up, the flag "CCD Completion" has not yet been set upbecause step #61 of FIG. 3 has not yet been performed. Therefore, step#17 is immediately followed by step #20. During the execution of theswitch discriminating routine at step #20, since it remains under the AFmode, it is determined not under the PF mode at step #263 of FIG. 9, andat step #264 a decision is made to determine if the low contrast flagLCF is "1". Since any step during which the flag LCF is set up has notyet been executed, the program flow returns to step #21 of FIG. 2.

During the execution of the end discriminating routine at step #21,since the motor MO has not yet been activated, the motor MO isdetermined at step #270 of FIG. 11 have not yet been activated, allowingthe program flow to return to step #22 of FIG. 2.

At step #22, a decision is made to determine if the shutter releaseswitch S2 is closed. Since at this time no in-focus display has yet beenpresented to the photographer, the switch S2 remains opened unless theshutter release button is depressed through the second stage, andtherefore, the program flow proceeds to step #25, skipping step #23, atwhich a decision has been made that the shutter release is not possible.Similarly, even though the shutter release button has been depressedthrough the second stage and the switch S2 has been consequently closed,the program flow proceeds to step #25 through step #23 because nodecision is made under the AF mode as to the in-focus condition and thelow contrast.

At step #25, it is confirmed that the light measuring switch S1 has beenclosed, and therefore, the AE routine is executed subsequently. Unlessthe interruption of the terminal INT1 resulting from the completion ofthe accumulation or that of the timer I resulting from the passage ofthe time count To is effected, the previously described operation isrepeated so long as the shutter release button is depressed.

When the interruption of the terminal INT1 or the timer I resulting fromthe completion of the accumulation or the passage of the longestaccumulating time is effected at a certain time during the repeatedoperation (or at a time during the initial execution of the AE routineas the case may be), the program flow shown in FIG. 3 is executed.

In the event of the interruption of the terminal INT1 resulting from thecompletion of the accumulation, step #54 takes place during which thecount time of the timer I then performing the accumulating operation isset in the register to.

On the contrary thereto, where a relatively long time is required tocomplete the accumulation because of the low brightness of the targetobject and the interruption of the timer I is subsequently effected, adecision is made at step #49 of FIG. 3 to determine if the accumulatingoperation is being performed, and if it is being performed, the programflow proceeds to step #54, even though the accumulation is insufficient,the after accumulation has been forcibly stopped at step #50.

After the calculation of the accumulating time at step #54, although adecision is made at step #55 to determine if the AF operation is beingperformed, the AF operation has not yet been started and, therefore, theprogram flow proceeds to step #56. Although at step #56 a decision ismade to determine if the motor MO is in the predetermined high speedcondition, the motor MO has not yet been activated and, therefore, theprogram flow proceeds to step #58 at which data resulting from theaccumulation is dumped.

At step #300, following step #58, a decision is made to determine if theflag SCF is "1". However, since the flag SCF has not yet been reset to"1", the program flow proceeds to step #59.

At step #59, a decision is made to determine if the AE operation hasbeen completed, that is, the interruption of the terminal INT1 resultingfrom the completion of the accumulation is effected during the course ofthe AE operation, and in the event that the interruption is effectedduring the AE operation and before the AE operation has not yet beencompleted, the program flow proceeds to step #61 at which the flag "CCDCompletion" indicative of the completion of the dumping of theaccumulating data, after which the program flow returns to resume theremaining steps of the AE operation.

In this way the AE operation is completed and at step #17 the flag "CCDCompletion" is set up, followed by the AF data processing routine DFAshown in FIG. 3.

Where the flag "AE Completion" is set up at step #59, decisions aresuccessively made at step #60 and #610 to determine if it is under thePF mode and if the low contrast flag LCF is "1", respectively. Sinceboth of the results of such decision are "No", the AF data processingroutine DFA is executed.

During the execution of the DFA routine, the flag "CCD Completion" isreset at step #65, and a decision is then made at step #66 to determineif a flag FDF is "0". Since it is the first time to pass through step#66 and the flag FDF remains reset to "0", step #307 takes place duringwhich, upon the completion of both of the first accumulation and thedumping of the accumulating data thereof, and at a timing before thestart of the AF data processing operation, the flag SCF is set to "1",and subsequently at step #69, the flag FDF is set to "1".

Thereafter, data of Ti-to in which the previous accumulating time to issubstracted from the data processing time Ti is set in the timer I, andthe interruption of the timer I is enabled at step #71.

Then, the shift calculation on the line sensor LM at step #72 as well asthe process from the switch discriminating routine at step #73 arecarried out in a manner similar to the process from step #20 to step #25shown in FIG. 2, followed by the continued operation of the AF dataprocessing.

This AF data processing operation is such that after step #79 has beenresumed subsequent to the determination at step #25 that the lightmeasuring switch S1 has been closed, the temporary focus detectingoperation is completed with the drive amount calculation at step #90 anda decision is subsequently made at step #91 to determine if the motor MOis in the high speed condition. Since the motor MO has not yet beendriven, step #91 is followed by step #308 at which a decision is made todetermine if the flag SCF is "1". If the flag SCF is "1" as determinedat step #308 and since the motor MO is not activated, the program flowproceeds from step #330 to step #94, but if the motor MO is thenactivated, step #309 takes place to reset the flag SCF to "0". Followingstep #309, the lens drive amount π2 at the time of the completion of theAF operation is set, followed by step #311 to obtain the corrected driveamount in which the lens drive amount (π1-π2) during the AF operation iscorrected from the calculated drive amount No of the lens, followed bystep #94. At step #94, the AF mode is confirmed, and therefore, the AFroutine shown in FIG. 4 is executed.

Assuming that a condition is before the lens shifting and it is neitherin the near zone nor at the end condition, the result of decision atstep #100 during the execution of the AF routine indicates that thein-focus condition is not accomplished, and therefore, the DRV routinefor the lens shifting is executed.

If the result of decision at step #115 indicates that an end flag ENF isnot "1", step #120 takes place to determine the direction of defocus,and the lens shifting direction appropriate thereto is determined ateither step #121 or step #122. After the confirmation at step #123 thatthe lens is outside the near zone, the near zone flag NZF is reset to"0" at step #132, followed by the respective determinations at the #133and at step #138 that the motor MO is not activated and that the flagSCF has been set and is therefore "1", a wait condition is established,without the motor MO being activated, until the completion of the secondaccumulation.

If the second accumulation is completed, the interruption of terminalINT1 or that of timer I is executed. Thus, after the above describedoperation, the motor MO is activated at step #302, and the time requiredto bring the motor MO to the predetermined high speed condition is, step#303, set in the timer I and counted down, and at step #304, theinterruption of the timer I is enabled.

Then, at step #305, the drive amount N-Nn necessary for the lens toarrive in the near zone is set in the event counter EVC and is counteddown in response to pulse inputs from the encoder EC to the terminalCKIN according to the drive of the motor MO. At step #301, theinterruption of the event conter EVC is enabled to permit the AE routineto be executed. When the second drive amount is determined while theflag SCF is set to "1", the amount of movement at that time is correctedso that it can be set in the event counter EVC at steps #309 to #311.

When the timer I counts this present time T2 down to 0, the interruptionof the timer I is effected and the program flow proceeds to step #49.

Since at this time the next succeeding accumulation has not yet beenstarted while the second accumulation and the AF data processingoperation have been completed, the program flow proceeds to step #51,and since it is not during the AF operation, but the AE routine is beingexecuted, the high speed condition HS is set at step #52, followed bythe accumulating routine at step #53 to permit the line sensor LM toperform the accumulating operation. During the execution of theaccumulating routine shown in FIG. 8, and at step #242, the interruptionof the terminal INT1 and the timer I is enabled, followed by theconfirmation at step #243 that the motor MO has been brought in thepredetermined high speed condition. Thereafter, the lens shifting amountπ0 at the time of start of the accumulating operation is set in theevent counter EVC to allow the AE routine to be resumed so that the AEroutine can be repeated until the interruption of the terminal INT1 orof the timer I is effected. Thereafter, each time the accumulation iscompleted, the lens shifting amount is determined, the lens movementamount between the accumulating time and the calculation is correctd,and the corrected data is again set in the event counter. Also, duringthe processing operation, the time of start of the accumulation isparallelly counted, and when the accumulation start time comes, theaccumulating operation is parallelly performed.

The foregoing operation is repeated until the lens arrives in the nearzone. When it arrives at the near zone, the event counter EVC countedjust down to 0 and, therefore, the interruption of the event counter EVCis effected. On the contrary thereto, where the lens is determined atstep #123 as arriving in the near zone as a result of the calculation,the program flow proceeds to step #124.

When the interruption of the event counter EVC is effected, step #220shown in FIG. 7 takes place at which a decision is made to determine ifthe near zone flag NZF is "1". Since the flag NZF remains reset to "0",step #221 takes place to brake the motor MO thereby to bring it in thepredetermined low speed condition, followed by the setting of the nearzone flag NZF to "1" at step #222.

Then, at step #223 the entire near zone width Nn from a near zoneposition to the in-focus position is set in the register ECR, and atstep #234 the interruption of the terminal INT1 and the timer I isdisabled to inhibit the subsequent data dumping thereby to protect theAF control based on the data obtained when entering the near zone, afterwhich the AE routine is repeated to execute has the subsequent processby means of the interruption.

The event counter EVC is set to "1" at step #229 so that the motor MOcan be controlled so as to be kept in the predetermined low speedcondition, the resetting and start of the timer II are effected at thestep #230, and the interruption of the event counter EVC is enabled atstep #231.

When EVC=0, the interruption of the event counter EVC is effected, andaccordingly, step #220 is again resumed. Since at this time the nearzone flag NZF is rendered to be "1", 1 is subtracred from the registerECR at step #224, followed by a decision at step #225 to determine ifthe register ECR has been substracted to zero, that is, if the lenshaving been moved an amount equal to the near zone width Nn has arrivedat an in-focus region.

Until ECR=0 is established, that is until the lens arrives at thein-focus region, the low speed drive control of the motor is effectedfrom step #226 to step #231 so that the lens can be driven towards thein-focus position.

When the lens has arrived at the in-focus region, it is confirmed thatthe contents of register ECR is "0" at step #225, followed by theexecution of the motor stop routine at step #232. After the motor hasbeen stopped, the accumulating routine is executed at step #233 for thereconfirmation of the in-focus condition.

When the accumulation started by the accumulating routine shown in FIG.8 has terminated and the interruption of the terminal INT1 has beeninterrupted subsequently, the program flow proceeds to step #54 at whichthe time required to complete the accumulation so effected is set in theregister to a data representative of the longest accumulating time Toless the count time of the timer I during the accumulation. Then adecision is made at step #55 to determine if the AF operation is beingperformed. Since the AF operation is then terminated step #56 takesplace to determine if the motor MO is in the predetermined high speedcondition. As the motor MO is then stopped, the program flow proceeds tostep #58 to effect the dumping of the data accumulated for thepreviously mentioned in-focus reconfirmation.

Then, in view of the fact that the flag SCF is "0" because of havingbeen reset at step #300, the program flow proceeds to step #59, and inview of the flag FDF having been determined to be "1" at step #66following step #65, a decision is made at step #67 to determine if themotor MO is in the predetermined high speed condition. However, sincethe motor MO is stopped, the program flow proceeds to step #68, at whichit is determined that the low contrast flag LCF is not "1" and,accordingly, the AF calculating operation at step #72 et seqq. isperformed, followed by step #94 and then by the AF routine of FIG. 4after the falg SCF has been determined at step #308 to be "1".

If step #100 determines that the lens is the in-focus region, a decisionis made at step #101 to determine if the motor MO is activated. Sincethe motor MO is stopped, step #105 takes place to determine if the endflag ENF is "1".

After the in-focus display has been effected at step #108 in view of theend flag ENF being "0", the shutter release is enabled at step #109, thein-focus flag AIF is set to "1" at step #110, and the flag SCF is resetto "0" at step #312, followed by the return to the AE routine after theinterruption of the timer I and the terminal INT1 have been disabled atstep #313, whereby the photographing can be carried out while the shiftto the shutter release routine in the AE locked and focus conditions ispossible.

Where step #123 shown in FIG. 4 has indicated the arrival at the nearzone, step #124 takes place to determine if the motor MO is activated.Since the motor MO is not stopped, step #125 takes place to apply abrake to the motor MO to being the latter in the predetermined low speedcondition. Thereafter, step #127 takes place at which the lens driveamount N is set in the register ECR, followed by the process takingplace from step #128 to step #130 which is similar to the process fromstep #229 to step #231 of the event counter interrupting routine shownin FIG. 7. Then, the near zone flag NZF is rendered to be "1" at step#131, the flag SCF is rendered to be "0" at step #314, and theinterruption of the timer I and the terminal INT1 is disabled at step#315, allowing the program flow to return to the AE routine.

Each time the interruption of the event counter is effected while the AEroutine is executed, the in-focus determination and the lens speedcontrol are effected in a manner similar to that described hereinabove,and when step #225 indicates the in-focus condition (ECR=0), the processfrom the motor stop routine at step #232 to the accumulating routine atstep #233 for the in-focus confirmation is performed, followed by thereturn of the program flow to again execute steps #100, #101, #105, #108and so on in sequence to enable the shutter release and to disable bothof the accumulation and the focus detecting operation with theconsequence that the program flow returns to the AE routine.

After step #100 of the AE routine has indicated the in-focus condition(N≦N1), and if the motor MO is determined as activated at step #101, itmeans that the in-focus condition has been established without resortingto a route including the motor stop routine at step #232 of theinterruption of the event counter EVC and, therefore, as is the casewith the interruption of the event counter EVC, the motor stop routineis performed at step #102 to stop the motor, and, before returning tothe AE routine, the accumulating routine is performed at step #103 forthe in-focus confirmation. When the AF routine is again performed, theshutter release is enabled, but both of the accumulation and the focusdetecting operation are disabled, followed by the AE routine.

When the AE routine is resumed as a result of the in-focus confirmationwith the shutter release enabled and with both of the accumulation andthe focus detecting operation disabled, the AE calculation based on thenew measured light data obtained immediately before the in-focusdetermination and locked is again performed, and the program flowproceeds from step #17 to step #20 in view of the flag "CCD Completion"having been reset, followed by step #23 via steps #20, #21 and #22. Atstep #23, a decision is made to determine if the shutter release isenabled. As a result thereof, the shutter release is enabled, and afterit has been confirmed at step #24 that the switch S4 is opened as aresult of the shutter charge completion, the shutter release routine isexecuted.

The motor stop routine at step #40 is such that, if under the PF modethe motor MO is activated, the motor MO is inactivated and, after the AFdisplay has been turned off at step #41, the photographing is carriedout at step #42 with the exposure control based on the AE calculation.Step #43 is repeated subsequent to the completion of the photographingoperation and until the switch S4 is closed, and when the switch S4 isclosed, a wait condition is established for a predetermined timerequired to enable the light measurement and the focus detection again,followed by step #45 at which the shutter release is enabled.Thereafter, at step #46 a flag of "AE Not Completed" is set up, at step#47 the accumulating routine is executed for the subsequentphotographing, and after the interruption of the terminal INT1 or thetimer I has been enabled, the flag is reset at step #48 to permit theprogram flow to return to the AE routine.

When the light measuring switch S1 has been closed as a result of thedepression of the shutter release button but the depression of theshutter release button has been subsequently released in the coursebefore the photographing operation or after the photographing operationwith the consequence that not only the shutter release switch S2 butalso the light measuring switch S1 have been opened, this condition isconfirmed at either step #25 of the main routine shown in FIG. 2 or step#78 shown in FIG. 3 is therefore executed, followed by the return toinitial conditions after the interruption of the terminal INT0 has beenenabled at step #35.

The exemplary sequence of operation under the PF mode will now bedescribed. Unless it is not the low contrast, as is the case with theoperation under the AF mode, subsequent to the closure of the lightmeasuring switch S1 resulting from the depression of the shutter releasebutton, the first accumulation, the AE calculation and the AEcalculation to be performed until the interruption of the terminal INT1or the timer I resulting from the completion of said accumulation or thepassage of the longest accumulating time, respectively, are performed,followed by the execution of the interruption processing routine of FIG.3 during which the data dumping is carried out at step #58 and adecision is then made at step #59 to determine if the flag "AECompletion" is set up.

Even though the decision of the flag "AE Completion" is rendered, theresult of decision at subsequent step #60 indicates the PF mode and,therefore, as is the case wherein the flag "AE Completion" is not setup, the program flow proceeds to step #61 at which the flag "CCDCompletion" is set up, followed by the return to the AE routine.

In this way, the remaining steps of the AE routine are performed, and ifthey have been completely performed, the program flow proceedsimmediately to step #17 at which the flag "CCD Completion" is confirmed,followed by the execution of the AF data processing routine DFA shown inFIG. 3.

Then, as is the case under the AF mode, the AF data processing operationis entered and, after the PF mode has been confirmed at step #94, the PFroutine shown in FIG. 5 is initiated.

During the PF routine, and at step #145a, both of the flags SCF and AIFare reset to "0", and at subsequent step #140 the shutter release isenabled. In this way, although both of the AE calculation and the AFprocess and their associated displays are subsequently effected, theshutter release can be executed at any time regardless thereof.Accordingly, since the shutter priority mode is employed, all thephotographer has to do is execute the shutter release at a desireddecisive moment while viewing the AE and AF displays so effected.

Unless the shutter released is executed, both of the AE and AFoperations are repeated as hereinbefore described.

At the outset, a decision is made at step #141 to determine if thein-focus condition is established and, if it is not the in-focuscondition, step #169 takes place at which "0" is set to the in-focusflag AIF, followed by the display at step #170 of the direction ofdefocus.

Then, after the respective decisions have been made at steps #171 and#173 to determine the states of the PF switches PFS1 and PFS2, eitherstep #172 or step #174 takes place to determine if the designated drivedirection of the motor MO conforms to that dependent on one of the PFswitches PFS1 and PFS2. If the both conform to each other, the DRVroutine for the lens drive shown in FIG. 4 is executed.

During the eexecution of the DRV routine, as is the case under the AFmode, the motor MO is activated at either step #134 or step #126depending on whether the lens is in the near zone or whether it isoutside the near zone. Where the lens is outside the near zone, thedrive is effected to bring the lens into the near zone, followed by thehigh speed drive of the lens towards the in-focus position, but where itis within the near zone, the low speed drive is effected to move thelens towards the in-focus position.

By the interruption of the event counter EVC when the drive has beeneffected to move the lens towards the in-focus position, and if thein-focus condition is determined at step #225 of the flow shown in FIG.7, the motor stop subroutine at step #232 and the accumualting routineat step #233 for the in-focus confirmation are sequentially performed,followed by the return to the return address.

When step #17 takes place subsequent to the execution of the AE routine,and since the flag "CCD Completion" has been reset, the switchdiscriminating routine is executed at step #20.

During this routine, steps #263, #265 and #266 shown in FIG. 8 indicatethe PF mode, and the closure of one of the PF switches PFS1 and PFS2 isconfirmed, and therefore, the motor stop routine is executed at step#267 to stop the motor MO, followed by the return to the enddiscriminating subroutine at step #21.

In this routine, since the motor MO has been inactivated, the programflow returns to stop #22 shown in FIG. 2. Should the shutter releaseswitch S2 be then closed, step #23 takes place to determine whether ornot the shutter release is enabled, and since it is enabled, the programflow proceeds to step #24 and the photographing and the subsequentprocess are thereafter performed in a manner similar to that under theAF mode.

If the photographer has no will to take a photograph even though thein-focus condition has been established, the shutter release switch S2remains opened. If this is determined at step #23, step #25 takes placeto determine if the photographer has a will to continue thephotographing, the after it is determined that one of the PF switchesPFS1 and PFS2 has been closed, it is determined that the photographingis to be continued and, therefore, the program flow return to the AEroutine. This takes place for the purpose of obtaining updated AEconditions, and, subsequently, the previously described operation isrepeated until the in-focus confirmation attains IFR=3. When IFR=3, theAE routine is performed while the lens is driven a predetermined amountNc at a low speed. When the drive of the lens through the predeterminedamount has been confirmed at step #225 shown in FIG. 7, the motor MO isbrought to a halt and the accumulation is started with the program flowsubsequently returning to the AE routine in readiness for the actualshutter release. Even thereafter, if the switch is depressed in thereverse direction, the AE routine is repeated while the drive throughthe predetermined amount is effected, thereby repeating the motor stopand the accumulation start.

In describing the foregoing embodiment, reference has been made to theTTL light measuring, auto-focus camera. However, the present inventioncan be equally applicable to an external light measuring, auto-focuscamera.

Also, the present invention can be applicable to any data processingdevice having a charge accumulation type light receiving unit andcapable of performing a data processing on the basis of outputs datathereof, other than the various photographic instruments such as theauto-focus still and video cameras.

Moreover, the initation of the timer for the start of the accumulationmay be effected at a timing when the dumping of accumulated charges isstarted.

Furthermore, in the foregoing description, in order to enable theaccumulation to parallel the AF processing operation (including the lowcontrast and PF mode processing operations) and to cause theaccumulating operation to terminate simultaneously with the completionof the AF processing operation, arrangement has been made to cause thetime, required to start the accumulation based on the previousaccumulating time at steps #70 and #71, to be counted by the timer I inparallel relationship with the AF processing. However, the count startof this timer I may be started before the data dumping at step #58. Inthis case, no accumulated charge will be affected even though theaccumulation is effected during the data dumping, and the time for thedata dumping can be utilized effectively. Where this technique is to beemployed, the program flows shown in FIGS. 2 and 3 require amodification as shown in FIGS. 12 and 13, respectively, only differencebetween the program flows of FIGS. 2 and 3 and those of FIGS. 12 and 13being hereinafter described.

Referring to FIG. 12, at step #17 a decision is made to determine if theflag indicative of the completion of the accumulating operation is set,and if it is not, the program flow proceeds to step #20 as is the casein the program flow of FIG. 2. However, as shown, if the flag is set,the program flow proceeds to step #400 at which a decision is made todetermine if a flag FDF is "0". Since this flag FDF is "0" when thisroutine is passed for the first time, but otherwise "1", the programflow proceeds to step #404 in the event that this routine is passed forthe first time. On the other hand, where the passage through thisroutine is not for the first time, step #401 takes place to determine ifthe low contrast flag LCF is set. When this flag LCF is set to "1"because of the low contrast, the program flow proceeds to step #404.Conversely, if it is not a low contrast condition the program flowproceeds to step #402 at which a decision is made to determine if themode is the PF mode. If the result of decision at step #402 indicatesthat it is the PF mode, step #403 takes place to determine if the motorMO is in the predetermined high speed condition, followed by step #404in the event that the motor is in the predetermined high speedcondition. At step #404 the data T1-to is set in the timer I as is thecase with step #70 shown in FIG. 3, and the interruption of this timer Iis enabled at step #405, followed by the return to the DFA routine shownin FIG. 3. Should the PF mode not be determined at step #402, theprogram flow proceeds direct from step #402 to the DFA routine.

Referring to FIG. 13, if the motor MO is determined not in the highspeed condition at step #56, or in the event that the motor MO isdetermined in the high speed condition and the content of the eventcounter EVC is set in the register π1 at step #57, a decision is made atstep #500 to determine if the previously mentioned flag "AE Completion"has been set up. If this flag has been set up, the program flow proceedsto step #501 to determine if it is under the PF mode, and if it is notunder the PF mode, another decision is made at step #502 to determine ifit is in the low contrast condition. If the result of decision at step#502 does not indicate the low contrast condition, the program flowproceeds to step #503 to determine if it is for the first time, to passthrough this routine, and if it is for the first time, step #505 takesplace. If it is not for the first time, step #504 takes place todetermine if the motor MO is in the high speed condition, and if it isin the high speed condition, the program flow proceeds to #505. In theevent that the result of decision at step #501 indicates that the flag"AE Completion" has not yet been set up, that the result of decision atstep #501 indicates that it is not under the PF mode, or that the resultof decision at step #502 indicates that it is in the low contrastcondition, the respective program flow proceeds to step #58 at which thedata from the one-dimensional line sensor is dumped, and thereafter, theprogram flow proceeds to step #300 as shown in FIG. 13.

On the other hand, at step #505, so that T1'-T1 can correspond to thetime required for the data dumping, a data T1'-to is set in the timer Iwith the use of a new data T1' (wherein T1'>T1), and at step #506, theinterruption of this timer I is enabled, followed by step #58.Accordingly, in this modification, steps #67, #68, #70 and #71 shown inFIG. 2 can be dispensed with.

Although the present invention has fully been described in connectionwith the preferred embodiments thereof with reference to theaccompanying drawings, it is to be noted that various changes andmodifications are apparent to those skilled in the art. Such changes andmodifications are to be understood as included within the true scope ofthe present invention as defined by the appended claims unless theydepart therefrom.

We claim:
 1. A photo signal processing apparatus which comprises:a lightreceiving means of charge accumulation type for outputting datacorresponding to a condition of light received thereby; a dataprocessing means for applying a predetermined processing to the dataoutputted from the light receiving means; an accumulation initiatingmeans for causing the light receiving means to initiate a chargeaccumulating operation; an accumulation interrupting means forinterrupting the charge accumulating operation of the light receivingmeans; a count means for counting a time passed during a periodsubsequent to the start of the charge accumulating operation of thelight receiving means and until the termination of the chargeaccumulating operation of the light receiving means; and a control meansfor activating the accumulation initiating means at a timing required tointerrupt the charge accumulating operation of the light receiving meansat the time of termination of the data processing performed by the dataprocessing means.
 2. A photo signal processing apparatus whichcomprises:a light receiving means of charge accumulation type forreceiving light which has passed through a photographing lens and foroutputting data corresponding to a condition of light received thereby;a data processing means for detecing a focusing condition of thephotographing lens on the basis of the data received from the lightreceiving means and for outputting a focus adjustment data correspondingthereto; a drive means for moving the photographing lens on the basis ofthe focus adjustment data; and a control means for causing the lightreceiving means to carry out a charge accumulating operation for thesubsequent data processing in parallel relationship with the dataprocessing currently being performed by the data processing means andfor causing the data processing means to carry out the subsequent dataprocessing in parallel relationship with the operation of the drivemeans.
 3. The apparatus as claimed in claim 2, further comprising amonitor means for monitoring the amount of movement of the photographinglens effected by the drive means, and a data correcting means forcorrecting, by an amount corresponding to the amount of movement of thelens monitored, the focus adjustment data to be outputted by the dataprocessing means on the basis of the subsequent data processing.
 4. Aphoto signal processing apparatus which comprises:a light receiving unitof charge accumulation type for receiving light reflected from a targeobject to be photographed for the purpose of a focus detection of aphotographing lens; a microcomputer capable of performing an operationfor an automatic exposure control of a photographic camera and anoperation for an automatic focus adjustment, for causing the lightreceiving means to initiate a charge accumulating operation in parallelrelationship with the operation for the automatic exposure control, fortaking in a data from the light receiving means at the time oftermination of the charge accumulating operation, and for carrying outthe operation for the automatic focus adjustment under a first modesubsequent to the operation for the automatic exposure control, butcarrying out the operation for the automatic focus adjustment under asecond mode immediately after the data having been taken in.
 5. Theapparatus as claimed in claim 4, further comprising means for activatingthe microcomputer according to a manual manipulation, said first modecorresponding to a period subsequent to the activation of themicrocomputer and prior to the completion of the operation for theinitial automatic exposure control.
 6. A focus detecting apparatus foruse in a camera, comprising:a light receiving means of chargeaccumulation type for receiving light which has passed through aphotographic lens and for outputting data corresponding to the intensityof light received thereby; a data processing means for detecting afocused condition of the photographic lens on the basis of the lightreceived from the light receiving means; a means for initiating a chargeaccumulation in the light receiving means; a means for interrupting thecharge accumulation in the light receiving means; and a control meansfor activating the means for initiating a subsequent charge accumulationat a time period before completion of the data processing meansoperation on the current charge accumulation at such time that thesubsequent charge accumulation will be complete at or just subsequent tothe completion of the operation of the current data processing. .Iadd.7. A photo signal processing apparatus comprising:a microcomputerconsisting of only a single microprocessor for sequentially calculatingdata utilized in exposure control and for calculating data utilized infocus control; means for driving a photographing lens towards itsin-focus position under the control of said microprocessor; means forselecting either of a first mode of operation and a second mode ofoperation; and means, operating when a movement amount of thephotographing lens towards its in-focus position is larger than apredetermined value, for controlling said single microprocessor and saiddriving means so as to make said driving means operable while enablingboth of the exposure and focus control calculations to be operablesequentially in the microcomputer when the first mode is selected bysaid selecting means, and to make said driving means operable whileenabling only the exposure control calculation to be operable in themicrocomputer when the second mode is selected by said selecting means..Iaddend..Iadd.8. The apparatus as claimed in claim 7, wherein saidselecting means selects the first mode when said driving means startsits operation, and selects the second mode after a predetermined timeperiod after which the first mode was selected. .Iaddend..Iadd.9. Theapparatus as claimed in claim 7, further comprising, means for lockingsaid data to be utilized in an exposure control when said photographinglens reaches its in-focus position. .Iaddend..Iadd.10. A photo signalprocessing apparatus for a camera having a shutter and a lens that canbe driven by a motor comprising:a light receiving unit for a chargeaccumulation type for receiving light reflected from a targe object tobe photographed for the purpose of a focus detection of the lens, thelight receiving unit providing focus detection data; means forcontrolling the shutter including monitoring exposure light from thetarget object and providing light exposure data; a sequence controlmeans for sequentially processing the focus detection data to provide afocus condition of the lens and processing the light exposure data toprovide an exposure condition of the shutter including only a singlemicroprocessor for processing both the light exposure data and focusdetection data in a sequential manner; means for monitoring the statusof the data processing of the light exposure data, and means fordetermining whether light exposure data should be processed by thesingle microprocessor before completion of the processing of the focusdetection data. .Iaddend..Iadd.11. The apparatus as claimed in claim 10further including means for driving the motor until it reaches apredetermined speed, and determining means for providing a determinationwhen the motor reaches a predetermined speed, the means for determiningenables the processing of both the light exposure data and the focusdetection data when the determining means indicates a predeterminedspeed and enables only the processing of the light exposure data whenthe determining means does not indicate a predetermined speed. .Iaddend.